<template>
  <div>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="header">
        <div class="header-text">热门标签</div>
      </div>
      <div class="tag-container">
        <el-link
          v-for="(item,i) in tagList"
          :key="i"
          type="primary"
          class="link"
          :underline="false"
        >
          <el-tag type="success">{{ item.tagName }}</el-tag>
        </el-link>
      </div>
    </el-card>
  </div>
</template>

<script>
import { getHotTag } from '@/api/tag'

export default {
  data() {
    return {
      tagList: []
    }
  },
  created() {
    this.getHotTag()
  },
  methods: {
    getHotTag() {
      getHotTag().then(res => {
        this.tagList = res.data
      })
    }
  }
};
</script>

<style src="./my-tag.css" scoped>
</style>